package org.jeecg.modules.front.config;

//import com.iwhalecloud.craftsman.web.interceptor.AliPayInterceptor;

import org.jeecg.modules.front.interceptor.AuthenticationInterceptor;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.EnableWebMvc;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter;

@EnableWebMvc
@Configuration
public class WebConfig extends WebMvcConfigurerAdapter {

    @Bean
    AuthenticationInterceptor authenticationInterceptor() {
        return new AuthenticationInterceptor();
    }



    @Override
    public void addInterceptors(InterceptorRegistry registry) {
        registry.addInterceptor(authenticationInterceptor()).addPathPatterns("/mobile/**");
//        registry.addInterceptor(new AliPayInterceptor()).addPathPatterns("/aliPay/**");
//        registry.addInterceptor(new WxPayInterceptor()).addPathPatterns("/wxPay/**");

    }

}

